package com.njtoyo.taxi.admin.mapper.master.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.njtoyo.taxi.admin.mapper.master.enums.DriverFlowLogInOut;
import com.njtoyo.taxi.admin.mapper.master.enums.DriverFlowLogCategory;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author Dell
 * @since 2021-11-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "DriverFlowLog对象", description = "")
@Accessors(chain = true)
public class DriverFlowLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private Long driverId;

    @ApiModelProperty(value = "金额")
    private BigDecimal amount;

    @ApiModelProperty(value = "false:收入,out:支出")
    private DriverFlowLogInOut inOut;

    @ApiModelProperty(value = "类型 0:unknown[未知],1:order[订单车费],2:h5_order[扫码车费],3:promotion[推广奖励],4:redpack[红包奖励],5:withdraw[提现],6:customer_fine[用户有责取消罚金收入],7:rebate[司机现金返利],8:promotion_first_order[司机推广的乘客完成首单],9:online_order_reward[司机线上接单奖励]")
    private DriverFlowLogCategory category;

    @ApiModelProperty(value = "详细信息")
    private String detail;

    @ApiModelProperty(value = "额外信息（保留字段）")
    private String extra;

    @ApiModelProperty(value = "外键ID")
    private Long refId;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createdAt;


}
